-------------------------------------------------------------------------------
       log:  c:\growth\isqfinal\ot_tbl2.log
  log type:  text
 opened on:   7 Apr 2006, 16:43:03
Analysis do-file c:\growth\isqfinal\ot_tbl2 run on  7 Apr 2006 at 16:43:03

. /*analyses for Oneal and Tir's "Does the Diversionary Use of Force Threaten t
> he
> Democratic Peace," International Studies Quarterly, Table 2: 4-7-2006*/
. 
. set mem 120m
(122880k)

. 
. use c:\growth\isqfinal\otdirect
(Oneal&Tir ISQ re diversionary theory, directed dyads, w/ Chiozza&Goemans ldr d
> at)

. 
. desc 

Contains data from c:\growth\isqfinal\otdirect.dta
  obs:       919,530                          Oneal&Tir ISQ re diversionary
                                                theory, directed dyads, w/
                                                Chiozza&Goemans ldr dat
 vars:            31                          7 Apr 2006 16:41
 size:    68,045,220 (45.9% of memory free)   (_dta has notes)
-------------------------------------------------------------------------------
              storage  display     value
variable name   type   format      label      variable label
-------------------------------------------------------------------------------
state           int    %8.0g                  focal state, COW code
target          int    %8.0g                  potential target state, COW code
year            int    %8.0g                  
democ_st        byte   %8.0g                  state's DEMOC-AUTOC Polity score
democ_tgt       byte   %8.0g                  target's DEMOC-AUTOC Polity
                                                score
depend          float  %9.0g                  state's bilateral trade
                                                w/target/state's GDP
allies          byte   %8.0g                  =1 if allied
lncaprat        float  %9.0g                  ln(state's CINC/target/s CINC
dircont         byte   %9.0g                  =1 if land border
distance        int    %8.0g                  capital-to-capital distance
numstate        int    %8.0g                  number of states in system
finitsda        byte   %9.0g                  =1 if fatal dispute in year
                                                t+1, originator + side A
pyfatA          int    %8.0g                  Time since last finitsda
_spline1        float  %9.0g                  (pyfatA-k1) cubed
_spline2        float  %9.0g                  (pyfatA-k2) cubed
_spline3        float  %9.0g                  (pyfatA-k3) cubed
leadid_st       float  %9.0g                * revised id for leader of state
autoc_st_cg     byte   %9.0g                * Autocracy. See Jaggers and Gurr
                                                1995
mixed_st_cg     byte   %9.0g                * Mixed Regime. See Jaggers and
                                                Gurr 1995
democ_st_cg     byte   %9.0g                * Democracy. See Jaggers and Gurr
                                                1995
leadid_tgt      float  %9.0g                * revised id for leader of target
autoc_tgt_cg    byte   %9.0g                * Autocracy. See Jaggers and Gurr
                                                1995
mixed_tgt_cg    byte   %9.0g                * Mixed Regime. See Jaggers and
                                                Gurr 1995
democ_tgt_cg    byte   %9.0g                * Democracy. See Jaggers and Gurr
                                                1995
rgdp96_st       float  %9.0g                  real 1990$ gdp per capita
grow_st         float  %9.0g                  =((rgdp96pc/rgdp96pc[_n-2])^.5)
                                                -1
rgdp96_tgt      float  %9.0g                  real 1990$ gdp per capita
grow_tgt        float  %9.0g                  =((rgdp96pc/rgdp96pc[_n-2])^.5)
                                                -1
majpower        byte   %9.0g                  state is COW major power
elect_st        byte   %9.0g                  election in state, year t+1
elect_tg        byte   %9.0g                  election in target, year t+1
                                            * indicated variables have notes
-------------------------------------------------------------------------------
Sorted by:  state  target  year  

. summ

    Variable |       Obs        Mean    Std. Dev.       Min        Max
-------------+--------------------------------------------------------
       state |    919530    439.9403    246.4354          2        950
      target |    919530    439.9467    246.4363          2        950
        year |    919530    1973.206    19.23036       1918       1998
    democ_st |    919530   -.3267898       7.534        -10         10
   democ_tgt |    919530   -.3243744    7.534432        -10         10
-------------+--------------------------------------------------------
      depend |    856313    .0022735    .0187338          0   4.297579
      allies |    919530    .0699912    .2551323          0          1
    lncaprat |    919302    .0005342    2.556379  -10.21899   10.21899
     dircont |    919530    .0417974    .2001261          0          1
    distance |    919530     4687.65    2711.032          5      12347
-------------+--------------------------------------------------------
    numstate |    919530    139.3208     39.4261         49        187
    finitsda |    919530    .0003186    .0178477          0          1
      pyfatA |    919530    33.18228    32.87813          0        183
    _spline1 |    919530   -37478.74    73825.37  -504096.5          0
    _spline2 |    919530   -75673.46    162569.1   -1135201          0
-------------+--------------------------------------------------------
    _spline3 |    919530   -104444.7    246805.6   -1790654          0
   leadid_st |    919530    1911.632    878.9031         25       3041
 autoc_st_cg |    919530    .3827205    .4860512          0          1
 mixed_st_cg |    919530      .30302    .4595641          0          1
 democ_st_cg |    919530    .3142595    .4642205          0          1
-------------+--------------------------------------------------------
  leadid_tgt |    919530    1911.656    878.9072         25       3041
autoc_tgt_cg |    919530    .3826085    .4860242          0          1
mixed_tgt_cg |    919530    .3030059     .459558          0          1
democ_tgt_cg |    919530    .3143856     .464271          0          1
   rgdp96_st |    869368    5582.096    6256.156   220.0399   46064.72
-------------+--------------------------------------------------------
     grow_st |    828628    .0162994     .047805  -.2822851   .5209076
  rgdp96_tgt |    869384    5583.028    6256.756   220.0399   46064.72
    grow_tgt |    828644    .0163004    .0478086  -.2822851   .5209076
    majpower |    919530    .0447098    .2066661          0          1
    elect_st |    914247    .0875868    .2826932          0          1
-------------+--------------------------------------------------------
    elect_tg |    882691    .0907373    .2872353          0          1

. 
. /*make minimum value of caprat positive and generate square*/
. replace lncaprat=lncaprat+10.3
(919302 real changes made)

. gen lncapsq=lncaprat^2
(228 missing values generated)

. 
. /*make sure growth not measured across leaders*/
. #del ;
delimiter now ;
. sort state target year;

. quietly by state target: gen grow_stldr=grow_st if (leadid_st==leadid_st[_n-1
> ] &
>       leadid_st==leadid_st[_n-2]);

. quietly by state target: gen grow_tgtldr=grow_tgt if (leadid_tgt==leadid_tgt[
> _n-1] &
>       leadid_tgt==leadid_tgt[_n-2]);

. #del cr
delimiter now cr
. 
. /*aut-aut is omitted category*/
. gen aut_dem=1 if autoc_st_cg==1 & democ_tgt_cg==1
(814473 missing values generated)

. replace aut_dem=0 if aut_dem==.             
(814473 real changes made)

. 
. gen dem_aut=1 if democ_st_cg==1 & autoc_tgt_cg==1
(814570 missing values generated)

. replace dem_aut=0 if dem_aut==.             
(814570 real changes made)

. 
. gen dem_dem=1 if democ_st_cg==1 & democ_tgt_cg==1
(827369 missing values generated)

. replace dem_dem=0 if dem_dem==.            
(827369 real changes made)

. 
. gen aut_mix=1 if autoc_st_cg==1 & mixed_tgt_cg==1
(826268 missing values generated)

. replace aut_mix=0 if aut_mix==.
(826268 real changes made)

. 
. gen dem_mix=1 if democ_st_cg==1 & mixed_tgt_cg==1
(827680 missing values generated)

. replace dem_mix=0 if dem_mix==.
(827680 real changes made)

. 
. gen mix_dem=1 if mixed_st_cg==1 & democ_tgt_cg==1
(827661 missing values generated)

. replace mix_dem=0 if mix_dem==.
(827661 real changes made)

. 
. gen mix_aut=1 if mixed_st_cg==1 & autoc_tgt_cg==1
(826274 missing values generated)

. replace mix_aut=0 if mix_aut==.
(826274 real changes made)

. 
. gen mix_mix=1 if mixed_st_cg==1 & mixed_tgt_cg==1
(826019 missing values generated)

. replace mix_mix=0 if mix_mix==.
(826019 real changes made)

. 
. gen logdist=ln(distance)

. 
. drop if depend>1
(63244 observations deleted)

. 
. drop if grow_stldr==.
(290199 observations deleted)

. /*drop exactly zero growth b/c result of interpol of rgdppc*/
. drop if grow_stldr==0
(56342 observations deleted)

. 
. /*create control for number of states in system for non-rel dyads*/
. gen systsize=-ln(numstate) if ~(dircont==1 | majpower==1)
(40574 missing values generated)

. replace systsize=0 if systsize==.
(40574 real changes made)

. 
. gen dyadid=(1000*state)+target

. 
. /*all dyads, fatal disputes in year t+1, originator + side A*/
. #del ;
delimiter now ;
. /*TABLE 2, COLUMN 1*/
> logit finitsda dem_* aut_* mix_* depend lncaprat lncapsq allies dircont logdi
> st
>       majpower systsize pyfatA _spl*, nolog cluster(dyadid);

Logit estimates                                   Number of obs   =     509604
                                                  Wald chi2(20)   =     751.32
                                                  Prob > chi2     =     0.0000
Log pseudo-likelihood = -832.65996                Pseudo R2       =     0.3616

                           (standard errors adjusted for clustering on dyadid)
------------------------------------------------------------------------------
             |               Robust
    finitsda |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
     dem_aut |   .1723402   .3789337     0.45   0.649    -.5703561    .9150366
     dem_dem |  -1.059686   .5878351    -1.80   0.071    -2.211822    .0924495
     dem_mix |  -.3136822   .4435853    -0.71   0.479    -1.183093     .555729
     aut_dem |   .6363942   .3500933     1.82   0.069     -.049776    1.322564
     aut_mix |  -.0025538   .2756541    -0.01   0.993    -.5428258    .5377182
     mix_dem |   .4603344   .4125365     1.12   0.264    -.3482224    1.268891
     mix_aut |   .1186231   .3283458     0.36   0.718    -.5249229    .7621692
     mix_mix |  -.0249477    .358834    -0.07   0.945    -.7282493     .678354
      depend |  -19.19769   10.67937    -1.80   0.072    -40.12886    1.733488
    lncaprat |   .7695442   .4232725     1.82   0.069    -.0600546    1.599143
     lncapsq |  -.0423307   .0201131    -2.10   0.035    -.0817516   -.0029098
      allies |  -.0042372   .2302733    -0.02   0.985    -.4555646    .4470903
     dircont |   1.586055   .5309926     2.99   0.003     .5453283    2.626781
     logdist |  -.3122321   .1168151    -2.67   0.008    -.5411855   -.0832787
    majpower |   .6022562   .4083072     1.48   0.140    -.1980113    1.402524
    systsize |   .5958821   .1135838     5.25   0.000     .3732619    .8185024
      pyfatA |  -.4916265   .0657387    -7.48   0.000    -.6204719    -.362781
    _spline1 |  -.0021081    .000392    -5.38   0.000    -.0028764   -.0013399
    _spline2 |   .0009673   .0002144     4.51   0.000      .000547    .0013876
    _spline3 |  -.0000675   .0000354    -1.91   0.056    -.0001368    1.82e-06
       _cons |  -4.831271   2.436804    -1.98   0.047    -9.607319   -.0552225
------------------------------------------------------------------------------

note: 56 failures and 0 successes completely determined.

.   testparm lncap*;

 ( 1)  lncaprat = 0
 ( 2)  lncapsq = 0

           chi2(  2) =    7.78
         Prob > chi2 =    0.0205


. /*TABLE 2, COLUMN 2: include only signif dyadic pairs*/
> logit finitsda dem_* aut_dem depend lncaprat lncapsq allies dircont logdist
>       majpower systsize pyfatA _spl*, nolog cluster(dyadid);

Logit estimates                                   Number of obs   =     509604
                                                  Wald chi2(16)   =     639.31
                                                  Prob > chi2     =     0.0000
Log pseudo-likelihood =   -833.805                Pseudo R2       =     0.3607

                           (standard errors adjusted for clustering on dyadid)
------------------------------------------------------------------------------
             |               Robust
    finitsda |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
     dem_aut |   .0925557   .3675976     0.25   0.801    -.6279223    .8130336
     dem_dem |   -1.15076   .5564527    -2.07   0.039    -2.241387   -.0601325
     dem_mix |  -.3929149   .4088962    -0.96   0.337    -1.194337    .4085068
     aut_dem |   .5513643   .2874096     1.92   0.055    -.0119482    1.114677
      depend |  -18.16364   10.08912    -1.80   0.072    -37.93795    1.610666
    lncaprat |    .750224   .4195938     1.79   0.074    -.0721646    1.572613
     lncapsq |  -.0414369   .0199429    -2.08   0.038    -.0805242   -.0023497
      allies |  -.0317952   .2306497    -0.14   0.890    -.4838602    .4202699
     dircont |   1.597075   .5282845     3.02   0.003     .5616564    2.632494
     logdist |   -.310322   .1143955    -2.71   0.007     -.534533   -.0861109
    majpower |   .6027385    .412305     1.46   0.144    -.2053645    1.410841
    systsize |   .5901895   .1130105     5.22   0.000      .368693    .8116859
      pyfatA |  -.4935263   .0660114    -7.48   0.000    -.6229062   -.3641464
    _spline1 |  -.0021106   .0003945    -5.35   0.000    -.0028839   -.0013373
    _spline2 |   .0009663    .000216     4.47   0.000      .000543    .0013896
    _spline3 |  -.0000664   .0000355    -1.87   0.061     -.000136    3.12e-06
       _cons |  -4.668942   2.396861    -1.95   0.051    -9.366704    .0288194
------------------------------------------------------------------------------

note: 50 failures and 0 successes completely determined.

.   testparm lncap*;

 ( 1)  lncaprat = 0
 ( 2)  lncapsq = 0

           chi2(  2) =    7.60
         Prob > chi2 =    0.0224


. gen grw_st_da=dem_aut*grow_stldr;

. gen grw_st_dd=dem_dem*grow_stldr;

. gen grw_st_dm=dem_mix*grow_stldr;

. /*TABLE 2, COLUMN 3*/
> logit finitsda dem_* aut_dem grw* depend lncaprat lncapsq allies dircont logd
> ist
>       majpower systsize pyfatA _spl*, nolog cluster(dyadid);

Logit estimates                                   Number of obs   =     509604
                                                  Wald chi2(19)   =     642.88
                                                  Prob > chi2     =     0.0000
Log pseudo-likelihood = -830.21891                Pseudo R2       =     0.3635

                           (standard errors adjusted for clustering on dyadid)
------------------------------------------------------------------------------
             |               Robust
    finitsda |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
     dem_aut |   .2511923   .3598824     0.70   0.485    -.4541643    .9565488
     dem_dem |  -.9998175   .5663997    -1.77   0.078    -2.109941    .1103056
     dem_mix |  -.1765969   .4192966    -0.42   0.674    -.9984032    .6452094
     aut_dem |   .5412415   .2880316     1.88   0.060    -.0232901    1.105773
   grw_st_da |  -10.66721   4.957265    -2.15   0.031    -20.38327   -.9511494
   grw_st_dd |  -22.55571   8.367267    -2.70   0.007    -38.95525   -6.156167
   grw_st_dm |  -12.01921   6.405351    -1.88   0.061    -24.57347    .5350459
      depend |  -17.12004   9.725727    -1.76   0.078    -36.18212    1.942034
    lncaprat |   .7470474   .4237225     1.76   0.078    -.0834334    1.577528
     lncapsq |  -.0414014   .0201725    -2.05   0.040    -.0809389   -.0018639
      allies |  -.0464679   .2291677    -0.20   0.839    -.4956285    .4026926
     dircont |   1.586072   .5283685     3.00   0.003     .5504887    2.621655
     logdist |  -.3227047   .1124249    -2.87   0.004    -.5430535   -.1023559
    majpower |   .6382194   .4132366     1.54   0.122    -.1717094    1.448148
    systsize |   .5875844   .1127283     5.21   0.000     .3666409    .8085279
      pyfatA |  -.4908818   .0651686    -7.53   0.000    -.6186099   -.3631538
    _spline1 |   -.002099   .0003917    -5.36   0.000    -.0028667   -.0013313
    _spline2 |   .0009608   .0002149     4.47   0.000     .0005396     .001382
    _spline3 |  -.0000659   .0000355    -1.86   0.063    -.0001356    3.68e-06
       _cons |  -4.568692   2.406972    -1.90   0.058    -9.286271    .1488876
------------------------------------------------------------------------------

note: 49 failures and 0 successes completely determined.

.   testparm lncap*;

 ( 1)  lncaprat = 0
 ( 2)  lncapsq = 0

           chi2(  2) =    7.49
         Prob > chi2 =    0.0236


. testparm grw_st_*;

 ( 1)  grw_st_da = 0
 ( 2)  grw_st_dd = 0
 ( 3)  grw_st_dm = 0

           chi2(  3) =   14.21
         Prob > chi2 =    0.0026


. test grw_st_dd=grw_st_dm;

 ( 1)  grw_st_dd - grw_st_dm = 0

           chi2(  1) =    1.02
         Prob > chi2 =    0.3118


. test grw_st_dd=grw_st_da, accumulate;

 ( 1)  grw_st_dd - grw_st_dm = 0
 ( 2) - grw_st_da + grw_st_dd = 0

           chi2(  2) =    1.54
         Prob > chi2 =    0.4619


. exit;

end of do-file
       log:  c:\growth\isqfinal\ot_tbl2.log
  log type:  text
 closed on:   7 Apr 2006, 16:44:08
-------------------------------------------------------------------------------
